<?php
require_once 'SavingsTransactions.php';
require_once 'SavingsAccounts.php';
require_once '../application/modules/admin/models/Clients.php';
require_once '../application/modules/admin/models/Businesses.php';

class Savings_SavingsTransactionController extends HTech_Controller_Action
{
    public function init()
    {  
        $cfg = array(
            'model' => 'SavingsTransactions', 
            'form' => 'Emms_Form_Savings_SavingsDeposit',
            'config' => array('add' => 'savings_transactions'),
            'actionContext' => array('view' => array('prn','mob'))
        );
        parent::init($cfg);    
    }
    
    public function viewAction() {
        parent::viewAction();
        switch ($this->view->SavingsTransactions->d->Type) {
            case 'Cash deposit':
                $this->view->Title = $this->view->translate('Cash deposit receipt');
                break;
            case 'Cash withdrawal':
                $this->view->Title = $this->view->translate('Cash withdrawal receipt');
                break; 
            default:
                $this->view->Title = $this->view->translate('Receipt');
                break; 
        }
    }
}
